import java.io.IOException;
import java.nio.file.FileAlreadyExistsException;
import java.util.Scanner;

 class Main1 {
    static void fun(String name) throws ArithmeticException,NullPointerException, FileAlreadyExistsException {
        if (!name.equals("西柚")){
            throw new FileAlreadyExistsException("名字匹配不正确");
        }
    }
    public static void main(String[] args) throws FileAlreadyExistsException {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        String name = scanner.nextLine();
        fun(name);
        try {
            System.out.println(10 / a);
            int x = 1;
            System.out.println("继续往下执行代码");

            System.out.println(x);
            System.out.println("无异常");
        }catch (ArithmeticException e){
            System.out.println("捕获到了算术异常");
        }catch (ArrayIndexOutOfBoundsException e){
            System.out.println("捕获到了数越界异常");
        }finally {
            scanner.close();
            System.out.println("检测完毕");
        }
    }
}

class Name{
    public void openName(String name) throws IOException {
        if (!name.equals("name.ini")){
            throw new IOException("名字不匹配");
        }else {
            throw new IOException("名字匹配");
        }
    }
}
public class Main{
    public static void main(String[] args) throws IOException {
        Name name = new Name();
        name.openName("name.ini");
    }
}